<!doctype html>
<html lang="en">
<!--[if IE 9 ]>
<html  lang="en" class="ie9">
<![endif]-->
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    <meta name="format-detection" content="telephone=no">
    <meta charset="UTF-8">
    <title>用户端</title>
    <!-- CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/animate.min.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="css/form.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/icons.css">
    <link rel="stylesheet" href="css/generics.css">
    <link rel="stylesheet" href="css/bstable/bootstrap-table.css">
    <link rel="stylesheet" href="css/bstable/bootstrap-table-self.css">
</head>
<body>
<header id="header" class="media">
    <a href="" id="menu-toggle"></a>
    <a class="logo pull-left" href="index.html">
        <img src="images/logo.png" alt="logo">
    </a>
    <div class="media-body">
        <div class="media" id="top-menu">
            <div class="pull-left tm-icon">
                <a data-drawer="messages" class="drawer-toggle" href="">
                    <i class="sa-top-message"></i>
                    <span>时间回溯</span>
                </a>
            </div>
            <div class="pull-left tm-icon">
                <a data-drawer="notifications" class="drawer-toggle" href="">
                    <i class="sa-top-updates"></i>
                    <span>帮助</span>
                </a>
            </div>
            <div id="time" class="pull-right">
                <span id="hours"></span>
                :
                <span id="min"></span>
                :
                <span id="sec"></span>
            </div>
            <div class="media-body">
                <input type="text" class="main-search">
            </div>
        </div>
    </div>
</header>
<div class="clearfix"></div>
<section id="main" class="p-relative" role="main">
    <!-- Sidebar -->
    <aside id="sidebar">
        <!-- Side Menu -->
        <ul class="list-unstyled side-menu">
            <li>
                <a class="sa-side-home" href="index.html">
                    <span class="menu-item">首页</span>
                </a>
            </li>
        </ul>
    </aside>
    <!-- Content -->
    <section id="content" class="container">
        <!-- Messages Drawer时间回溯 -->
        <div id="messages" class="tile drawer animated">
            <div class="listview narrow">
                <div class="media">
                    <a href="">时间回溯</a>
                    <span class="drawer-close">&times;</span>
                </div>
                <div class="overflow" style="height: 254px">
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/1.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Nadin Jackson - 2 Hours ago</small><br>
                            <a class="t-overflow" href="">Mauris consectetur urna nec tempor adipiscing. Proin sit amet nisi ligula. Sed eu adipiscing lectus</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/2.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">David Villa - 5 Hours ago</small><br>
                            <a class="t-overflow" href="">Suspendisse in purus ut nibh placerat Cras pulvinar euismod nunc quis gravida. Suspendisse pharetra</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/3.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Harris worgon - On 15/12/2013</small><br>
                            <a class="t-overflow" href="">Maecenas venenatis enim condimentum ultrices fringilla. Nulla eget libero rhoncus, bibendum diam eleifend, vulputate mi. Fusce non nibh pulvinar, ornare turpis id</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/4.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Mitch Bradberry - On 14/12/2013</small><br>
                            <a class="t-overflow" href="">Phasellus interdum felis enim, eu bibendum ipsum tristique vitae. Phasellus feugiat massa orci, sed viverra felis aliquet quis. Curabitur vel blandit odio. Vestibulum sagittis quis sem sit amet tristique.</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/1.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Nadin Jackson - On 15/12/2013</small><br>
                            <a class="t-overflow" href="">Ipsum wintoo consectetur urna nec tempor adipiscing. Proin sit amet nisi ligula. Sed eu adipiscing lectus</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/2.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">David Villa - On 16/12/2013</small><br>
                            <a class="t-overflow" href="">Suspendisse in purus ut nibh placerat Cras pulvinar euismod nunc quis gravida. Suspendisse pharetra</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/3.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Harris worgon - On 17/12/2013</small><br>
                            <a class="t-overflow" href="">Maecenas venenatis enim condimentum ultrices fringilla. Nulla eget libero rhoncus, bibendum diam eleifend, vulputate mi. Fusce non nibh pulvinar, ornare turpis id</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/4.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Mitch Bradberry - On 18/12/2013</small><br>
                            <a class="t-overflow" href="">Phasellus interdum felis enim, eu bibendum ipsum tristique vitae. Phasellus feugiat massa orci, sed viverra felis aliquet quis. Curabitur vel blandit odio. Vestibulum sagittis quis sem sit amet tristique.</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/5.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Wendy Mitchell - On 19/12/2013</small><br>
                            <a class="t-overflow" href="">Integer a eros dapibus, vehicula quam accumsan, tincidunt purus</a>
                        </div>
                    </div>
                </div>
                <div class="media text-center whiter l-100">
                    <a href=""><small>VIEW ALL</small></a>
                </div>
            </div>
        </div>
        <!-- Notification Drawer帮助 -->
        <div id="notifications" class="tile drawer animated">
            <div class="listview narrow">
                <div class="media">
                    <a href="">帮助</a>
                    <span class="drawer-close">&times;</span>
                </div>
                <div class="overflow" style="height: 254px">
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/1.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Nadin Jackson - 2 Hours ago</small><br>
                            <a class="t-overflow" href="">Mauris consectetur urna nec tempor adipiscing. Proin sit amet nisi ligula. Sed eu adipiscing lectus</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/2.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">David Villa - 5 Hours ago</small><br>
                            <a class="t-overflow" href="">Suspendisse in purus ut nibh placerat Cras pulvinar euismod nunc quis gravida. Suspendisse pharetra</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/3.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Harris worgon - On 15/12/2013</small><br>
                            <a class="t-overflow" href="">Maecenas venenatis enim condimentum ultrices fringilla. Nulla eget libero rhoncus, bibendum diam eleifend, vulputate mi. Fusce non nibh pulvinar, ornare turpis id</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/4.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Mitch Bradberry - On 14/12/2013</small><br>
                            <a class="t-overflow" href="">Phasellus interdum felis enim, eu bibendum ipsum tristique vitae. Phasellus feugiat massa orci, sed viverra felis aliquet quis. Curabitur vel blandit odio. Vestibulum sagittis quis sem sit amet tristique.</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/1.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">Nadin Jackson - On 15/12/2013</small><br>
                            <a class="t-overflow" href="">Ipsum wintoo consectetur urna nec tempor adipiscing. Proin sit amet nisi ligula. Sed eu adipiscing lectus</a>
                        </div>
                    </div>
                    <div class="media">
                        <div class="pull-left">
                            <img width="40" src="img/profile-pics/2.jpg" alt="">
                        </div>
                        <div class="media-body">
                            <small class="text-muted">David Villa - On 16/12/2013</small><br>
                            <a class="t-overflow" href="">Suspendisse in purus ut nibh placerat Cras pulvinar euismod nunc quis gravida. Suspendisse pharetra</a>
                        </div>
                    </div>
                </div>
                <div class="media text-center whiter l-100">
                    <a href=""><small>VIEW ALL</small></a>
                </div>
            </div>
        </div>
        <!-- Breadcrumb -->
        <div class="block-area">
          <!--  <h3 class="block-title">网元设置</h3>-->
            <div class="table-responsive overflow">
                <div id="btnAddRemove">
                 <!--   <button class="btn btn-default" id="addtable4Row">
                        <span>添加用户端</span>
                        <span class="glyphicon glyphicon-plus"></span>
                    </button>-->
                    <button class="btn btn-default" id="addtable4Row" style="margin-left: 10px;margin-right: 10px;">
                        <!--       <span>新增</span>-->
                        <span class="glyphicon glyphicon-plus"></span>
                    </button>
                    <button class="btn btn-default" id="deltable4Row" style="margin-right: 10px;">
                        <!--      <span>删除</span>-->
                        <span class="glyphicon glyphicon-remove"></span>
                    </button>
                    <button class="btn btn-default" id="changetable4Row" style="margin-right: 10px;">
                        <!--              <span>修改</span>-->
                        <span class="glyphicon glyphicon-pencil"></span>
                    </button>
                    <div class="modal fade in" id="addtableRow-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"  data-backdrop="static">
                        <div class="modal-dialog">
                            <div class="modal-content" style="background: #000;">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                        &times;
                                    </button>
                                    <h4 class="modal-title">
                                        添加子网
                                    </h4>
                                </div>
                                <div class="modal-body">
                                    <div class="form-horizontal">
                                    </div>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                                    </button>
                                    <button type="button" class="btn btn-primary footer-btn" id="btn-addtableRow">
                                        提交
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal fade in" id="changetableRow-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"  data-backdrop="static">
                        <div class="modal-dialog">
                            <div class="modal-content" style="background: #000;">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                        &times;
                                    </button>
                                    <h4 class="modal-title">
                                        更改行内容
                                    </h4>
                                </div>
                                <div class="modal-body">
                                    <div class="form-horizontal">
                                    </div>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                                    </button>
                                    <button type="button" class="btn btn-primary footer-btn" id="btn-changetableRow">
                                        提交
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal fade in" id="Confirm-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"  data-backdrop="static">
                        <div class="modal-dialog">
                            <div class="modal-content" style="background: #000;">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                        &times;
                                    </button>
                                    <h4 class="modal-title">
                                        操作
                                    </h4>
                                </div>
                                <div class="modal-body">
                                    确定删除此行吗？
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                                    </button>
                                    <button type="button" class="btn btn-primary footer-btn" data-dismiss="modal" id="btn-ConfirmdelRow">
                                        提交
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <table id="table5">
                </table>
            </div>
        </div>
    </section>
    <!-- Older IE Message -->
    <!--[if lt IE 9]>
    <div class="ie-block">
        <h1 class="Ops">抱歉！</h1>
        <p>您正在使用一个过时的Internet Explorer版本，升级到以下任何Web浏览器，以便访问该网站的最大功能。 </p>
        <ul class="browsers">
            <li>
                <a href="http://www.google.cn/intl/zh-CN/chrome/browser/desktop/index.html">
                    <img src="img/browsers/chrome.png" alt="">
                    <div>Google Chrome</div>
                </a>
            </li>
            <li>
                <a href="http://www.firefox.com.cn/">
                    <img src="img/browsers/firefox.png" alt="">
                    <div>Mozilla Firefox</div>
                </a>
            </li>
            <li>
                <a href="http://www.oupeng.com/download">
                    <img src="img/browsers/opera.png" alt="">
                    <div>Opera</div>
                </a>
            </li>
            <li>
                <a href="https://www.apple.com/cn/safari/">
                    <img src="img/browsers/safari.png" alt="">
                    <div>Safari</div>
                </a>
            </li>
            <li>
                <a href="https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads">
                    <img src="img/browsers/ie.png" alt="">
                    <div>Internet Explorer(New)</div>
                </a>
            </li>
        </ul>
        <p>升级你的浏览器更安全和更快的网络体验。 <br/>感谢你的支持...</p>
    </div>
    <![endif]-->
</section>
</body>
</html>
<!-- jQuery -->
<script src="js/jquery.min.js"></script> <!-- jQuery Library -->
<!-- Bootstrap -->
<script src="js/bootstrap.min.js"></script>
<!-- Bootstrap-table -->
<script src="js/bstable/bootstrap-table.js"></script>
<script src="js/bstable/bootstrap-table-zh-CN.js"></script>
<script src="js/select.min.js"></script>
<script src="js/chosen.min.js"></script>
<script src="js/icheck.js"></script>
<script src="js/functions.js"></script>
<script src="js/changebgsave.js"></script>
<script src="js/sidebar.js"></script>
<script src="js/bstable/handlebsTable.js"></script>
<script>
    $(function(){
        function temp(){
            var field = ["name","ipNet","bandWidth","descrption"],
                    titleText = ["名称","子网/网段","带宽","备注"];
            $("#table5").bootstrapTable({
                toggle:"table",
                url:"/client/getClient.do?moduleId=11",
                toolbar:"#btnAddRemove",
                height:"360",
                pagination:true,
                showColumns:true,
                columns:[
                    {
                        field: 'name',
                        title:"名称",
                        sortable: true
                    },
                    {
                        field: 'ipNet',
                        title:"子网/网段",
                        sortable: true
                    },
                    {
                        field: 'bandWidth',
                        title:"带宽",
                        sortable: true
                    },
                    {
                        field: 'descrption',
                        title:"备注",
                        sortable: true
                    },
                    {
                        title:"操作",
                        events: {
                            'click .remove': function (e, value, row, index) {
                                console.log(row);
                                $("#Confirm-modal").modal("show");
                                $("#btn-ConfirmdelRow").one("click",function(){
                                    $.ajax({
                                        url:"/client/delClient.do",
                                        type:"post",
                                        data:{
                                            appId:row.appId
                                        },
                                        dataType:"json",
                                        success:function(data){
                                            if(data.success=="1"){
                                                $("#table5").bootstrapTable('remove',{
                                                    field: 'id',
                                                    values: [row.appId]
                                                })
                                            }else {
                                                alert("删除失败，请稍后再试");
                                            }
                                        }
                                    });
                                });
                            },
                            'click .edit':function(e, value, index,row){
                                console.log(index);
                                $("#changetableRow-modal>.modal-dialog>.modal-content>.modal-body>.form-horizontal").html("");
                                var InputVal = [];
                                for(var j=0;j<field.length;j++){
                                    InputVal.push(index[field[j]]);
                                }
                                for(var i=0;i<titleText.length;i++){
                                    var formGroup = $('<div class="form-group">'+
                                            '<div class="col-md-8">'+
                                            '<input type="text" class="form-control input-sm m-t-15 addtableRowInput"  value="'+InputVal[i]+'">'+
                                            '</div>'+
                                            '</div>');
                                    var label = $('<lable class="col-md-3 control-label">'+
                                            titleText[i]+
                                            ':</lable>');
                                    $(formGroup).prepend(label);
                                    $("#changetableRow-modal>.modal-dialog>.modal-content>.modal-body>.form-horizontal").append(formGroup);
                                }
                                $('#changetableRow-modal').modal('show');

                                $("#btn-changetableRow").one("click",function(){
                                    if(change()){
                                        $('#changetableRow-modal').modal('hide');
                                        var name = $("#changetableRow-modal .addtableRowInput:eq(0)").val(),
                                                displayIp = $("#changetableRow-modal .addtableRowInput:eq(1)").val(),
                                                bandWidth = $("#changetableRow-modal .addtableRowInput:eq(2)").val(),
                                                descrption = $("#changetableRow-modal .addtableRowInput:eq(3)").val();
                                        $.ajax({
                                            url:"/client/updateClient.do",
                                            type:"post",
                                            data:{
                                                id:index.id,
                                                appId:index.appId,
                                                bandWidth:bandWidth,
                                                moduleId:index.moduleId,
                                                name:name,
                                                displayIp:displayIp,
                                                descrption:descrption
                                            },
                                            dataType:"json",
                                            success:function(data){
                                                if(data.success=="1"){
                                                    $("#table5").bootstrapTable('updateRow',{
                                                        index:row,
                                                        row:{
                                                            id:index.id,
                                                            name:name,
                                                            bandWidth:bandWidth,
                                                            descrption:descrption
                                                        }
                                                    })
                                                }else {
                                                    alert("后端验证不通过，修改失败，请稍后再试");
                                                }
                                            }
                                        });
                                    }
                                });
                            }
                        },
                        formatter: function(){
                            return [
                                '<img src="images/edit.png"/ class="cursor edit"/>' +
                                '<img src="images/false.png" style="padding-left: 10%;" class="cursor imgDel remove"/>'
                            ].join('');
                        }
                    }
                ]
            });
            function change(){
                var name = $("#changetableRow-modal .addtableRowInput:eq(0)").val();
                if(!verification(name)){
                    alert("名称应小于32个字符且不能为空");
                    return false;
                }
                var regex = /^\s*((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}(:|((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})|(:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){4}(:[0-9A-Fa-f]{1,4}){0,1}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){3}(:[0-9A-Fa-f]{1,4}){0,2}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){2}(:[0-9A-Fa-f]{1,4}){0,3}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:)(:[0-9A-Fa-f]{1,4}){0,4}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(:(:[0-9A-Fa-f]{1,4}){0,5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})))(%.+)?\s*$/;
                var displayIp = $("#changetableRow-modal .addtableRowInput:eq(1)").val();
                if(displayIp.indexOf("/")>-1 ){
                    if(displayIp.split("/")[1]<24){
                        alert("只能添加C类网段！");
                        return false;
                    }else if(regex.test(displayIp.split("/")[0])){

                    }else if (displayIp.split("/")[1]>32){
                        alert("子网掩码错误！");
                        return false;
                    }else{
                        alert("网段不正确，请重新输入 ！");
                        return false;
                    }
                } else {
                    alert("网段不正确，请重新输入 ！");
                    return false;
                }
                if(displayIp.indexOf("-")>-1){
                    if(regex.test(displayIp.indexOf("-")[0]) || regex.test(displayIp.indexOf("-")[1])){

                    }else{
                        alert("网段不正确，请重新输入 ！");
                        return false;
                    }
                }
                var bandWidth = $("#changetableRow-modal .addtableRowInput:eq(2)").val();
                var p =/^[0-9]{1,20}$/;
                if(!p.test(bandWidth)){
                    alert("带宽只能为数字");
                    return false;
                }else if (bandWidth=="0"|| bandWidth== ""){
                    alert("带宽不能为空或者0");
                    return false;
                }
                return true;
            };
            /**************增加行******************************/
            $("#addtable4Row").click(function(){
                $("#addtableRow-modal>.modal-dialog>.modal-content>.modal-body>.form-horizontal").html("");
                var length = titleText.length;
                for(var i=0;i<length;i++){
                    var formGroup = $('<div class="form-group">'+
                            '<div class="col-md-8">'+
                            '<input type="text" class="form-control input-sm m-t-15 addtableRowInput">'+
                            '</div>'+
                            '</div>');
                    var label = $('<lable class="col-md-3 control-label">'+
                            titleText[i]+
                            ':</lable>');
                    $(formGroup).prepend(label);
                    $("#addtableRow-modal>.modal-dialog>.modal-content>.modal-body>.form-horizontal").append(formGroup);
                }
                $("#addtableRow-modal").modal("show");
            });
            $("#btn-addtableRow").click(function(){
                if(add()){
                    $("#addtableRow-modal").modal("hide");
                    var name = $("#addtableRow-modal .addtableRowInput:eq(0)").val();
                    var displayIp = $("#addtableRow-modal .addtableRowInput:eq(1)").val();
                    var bandWidth = $("#addtableRow-modal .addtableRowInput:eq(2)").val();
                    var descrption = $("#addtableRow-modal .addtableRowInput:eq(3)").val();
                    $.ajax({
                        url:"/client/addClient.do",
                        type:"post",
                        data:{bandWidth:bandWidth,moduleId:11,name:name,displayIp:displayIp,descrption:descrption},
                        dataType:"json",
                        success:function(data){
                            switch (data.success-0){
                                case 1:
                                    $.ajax({
                                        url:"/client/getClient.do",
                                        type:"post",
                                        data:{
                                            moduleId:11
                                        },
                                        dataType:"json",
                                        success:function(addData){
                                            $("#table5").bootstrapTable("load",addData);
                                        }
                                    });
                                    break;
                                case 0:
                                    alert("后端验证不通过，保存失败，请稍后再试");
                                    break;
                                case 2:
                                    alert("名称已存在，请重新命名");
                                    break;
                                case 3:
                                    alert("网段不正确，请重新填写");
                                    break;
                            }
                        }
                    });
                }

            });
            function add(){
                var name = $("#addtableRow-modal .addtableRowInput:eq(0)").val();
                if(!verification(name)){
                    alert("名称应小于32个字符且不能为空");
                    return false;
                }
                var regex = /^\s*((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}(:|((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})|(:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){4}(:[0-9A-Fa-f]{1,4}){0,1}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){3}(:[0-9A-Fa-f]{1,4}){0,2}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){2}(:[0-9A-Fa-f]{1,4}){0,3}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:)(:[0-9A-Fa-f]{1,4}){0,4}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(:(:[0-9A-Fa-f]{1,4}){0,5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})))(%.+)?\s*$/;
                var displayIp = $("#addtableRow-modal .addtableRowInput:eq(1)").val();
                if(displayIp.indexOf("/")>-1 ){
                    if(displayIp.split("/")[1]<24){
                        alert("只能添加C类网段！");
                        return false;
                    }else if(regex.test(displayIp.split("/")[0])){

                    }else if (displayIp.split("/")[1]>32){
                        alert("子网掩码错误！");
                        return false;
                    }else{
                        alert("网段不正确，请重新输入 ！");
                        return false;
                    }
                } else {
                    alert("网段不正确，请重新输入 ！");
                    return false;
                }
                if(displayIp.indexOf("-")>-1){
                    if(regex.test(displayIp.indexOf("-")[0]) || regex.test(displayIp.indexOf("-")[1])){

                    }else{
                        alert("网段不正确，请重新输入 ！");
                        return false;
                    }
                }

                var bandWidth = $("#addtableRow-modal .addtableRowInput:eq(2)").val();
                var p =/^[0-9]{1,20}$/;
                if(!p.test(bandWidth)){
                    alert("带宽只能为数字");
                    return false;
                }else if (bandWidth=="0"|| bandWidth== ""){
                    alert("带宽不能为空或者0");
                    return false;
                }
                return true;
            };
            function verification(str){
                /*验证用户名 将一个汉字转换成两个字符*/
                var totalCount = 0;
                for (var i=0; i<str.length; i++){
                    var c = str.charCodeAt(i);
                    if ((c >= 0x0001 && c <= 0x007e) || (0xff60<=c && c<=0xff9f)){
                        totalCount++;
                    }else{
                        totalCount+=2;
                    }
                }
                if(totalCount){
                    if(totalCount<32){
                        return true;
                    }else {
                        return false;
                    }
                }else {
                    return false;
                }
            };
        }
        function temp3(){
            function change(){
                var name = $("#changetableRow-modal .addtableRowInput:eq(0)").val();
                if(!verification(name)){
                    alert("名称应小于32个字符且不能为空");
                    return false;
                }
                var regex = /^\s*((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}(:|((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})|(:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){4}(:[0-9A-Fa-f]{1,4}){0,1}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){3}(:[0-9A-Fa-f]{1,4}){0,2}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){2}(:[0-9A-Fa-f]{1,4}){0,3}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:)(:[0-9A-Fa-f]{1,4}){0,4}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(:(:[0-9A-Fa-f]{1,4}){0,5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})))(%.+)?\s*$/;
                var displayIp = $("#changetableRow-modal .addtableRowInput:eq(1)").val();
                if(displayIp.indexOf("/")>-1 ){
                    if(displayIp.split("/")[1]<24){
                        alert("只能添加C类网段！");
                        return false;
                    }else if(regex.test(displayIp.split("/")[0])){

                    }else if (displayIp.split("/")[1]>32){
                        alert("子网掩码错误！");
                        return false;
                    }else{
                        alert("网段不正确，请重新输入 ！");
                        return false;
                    }
                } else {
                    alert("网段不正确，请重新输入 ！");
                    return false;
                }
                if(displayIp.indexOf("-")>-1){
                    if(regex.test(displayIp.indexOf("-")[0]) || regex.test(displayIp.indexOf("-")[1])){

                    }else{
                        alert("网段不正确，请重新输入 ！");
                        return false;
                    }
                }
                var bandWidth = $("#changetableRow-modal .addtableRowInput:eq(2)").val();
                var p =/^[0-9]{1,20}$/;
                if(!p.test(bandWidth)){
                    alert("带宽只能为数字");
                    return false;
                }else if (bandWidth=="0"|| bandWidth== ""){
                    alert("带宽不能为空或者0");
                    return false;
                }
                return true;
            };
            function add(){
                var name = $("#addtableRow-modal .addtableRowInput:eq(0)").val();
                if(!verification(name)){
                    alert("名称应小于32个字符且不能为空");
                    return false;
                }
                var regex = /^\s*((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}(:|((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})|(:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){4}(:[0-9A-Fa-f]{1,4}){0,1}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){3}(:[0-9A-Fa-f]{1,4}){0,2}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){2}(:[0-9A-Fa-f]{1,4}){0,3}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:)(:[0-9A-Fa-f]{1,4}){0,4}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(:(:[0-9A-Fa-f]{1,4}){0,5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})))(%.+)?\s*$/;
                var displayIp = $("#addtableRow-modal .addtableRowInput:eq(1)").val();
                if(displayIp.indexOf("/")>-1 ){
                    if(displayIp.split("/")[1]<24){
                        alert("只能添加C类网段！");
                        return false;
                    }else if(regex.test(displayIp.split("/")[0])){

                    }else if (displayIp.split("/")[1]>32){
                        alert("子网掩码错误！");
                        return false;
                    }else{
                        alert("网段不正确，请重新输入 ！");
                        return false;
                    }
                } else {
                    alert("网段不正确，请重新输入 ！");
                    return false;
                }
                if(displayIp.indexOf("-")>-1){
                    if(regex.test(displayIp.indexOf("-")[0]) || regex.test(displayIp.indexOf("-")[1])){

                    }else{
                        alert("网段不正确，请重新输入 ！");
                        return false;
                    }
                }

                var bandWidth = $("#addtableRow-modal .addtableRowInput:eq(2)").val();
                var p =/^[0-9]{1,20}$/;
                if(!p.test(bandWidth)){
                    alert("带宽只能为数字");
                    return false;
                }else if (bandWidth=="0"|| bandWidth== ""){
                    alert("带宽不能为空或者0");
                    return false;
                }
                return true;
            };
        }
        function temp4(){
            var field = ["name","ipNet","bandWidth","descrption"],
                    titleText = ["名称","子网/网段","带宽","备注"];
            $("#table5").bootstrapTable({
                toggle:"table",
                url:"/client/getClient.do?moduleId=11",
                toolbar:"#btnAddRemove",
                pagination:true,
                showColumns:true,
                columns:[
                    {
                        field: 'name',
                        title:"名称",
                        sortable: true
                    },
                    {
                        field: 'ipNet',
                        title:"子网/网段",
                        sortable: true
                    },
                    {
                        field: 'bandWidth',
                        title:"带宽",
                        sortable: true
                    },
                    {
                        field: 'descrption',
                        title:"备注",
                        sortable: true
                    }
                ],
                onClickRow:function(e,row){
                    $(".tabRowClickbg").removeClass("tabRowClickbg");
                    $(row).addClass("tabRowClickbg");
                }
            });
            function valiDate(element){
                function verification(str){
                    /*验证用户名 将一个汉字转换成两个字符*/
                    var totalCount = 0;
                    for (var i=0; i<str.length; i++){
                        var c = str.charCodeAt(i);
                        if ((c >= 0x0001 && c <= 0x007e) || (0xff60<=c && c<=0xff9f)){
                            totalCount++;
                        }else{
                            totalCount+=2;
                        }
                    }
                    if(totalCount){
                        if(totalCount<32){
                            return true;
                        }else {
                            return false;
                        }
                    }else {
                        return false;
                    }
                };
                var name = $("#"+element+"-modal .addtableRowInput:eq(0)").val();
                if(!verification(name)){
                    alert("名称应小于32个字符且不能为空");
                    return false;
                }
                var regex = /^\s*((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}(:|((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})|(:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){4}(:[0-9A-Fa-f]{1,4}){0,1}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){3}(:[0-9A-Fa-f]{1,4}){0,2}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){2}(:[0-9A-Fa-f]{1,4}){0,3}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:)(:[0-9A-Fa-f]{1,4}){0,4}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(:(:[0-9A-Fa-f]{1,4}){0,5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})))(%.+)?\s*$/;
                var displayIp = $("#"+element+"-modal .addtableRowInput:eq(1)").val();
                if(displayIp.indexOf("/")>-1 ){
                    if(displayIp.split("/")[1]<24){
                        alert("只能添加C类网段！");
                        return false;
                    }else if(regex.test(displayIp.split("/")[0])){

                    }else if (displayIp.split("/")[1]>32){
                        alert("子网掩码错误！");
                        return false;
                    }else{
                        alert("网段不正确，请重新输入 ！");
                        return false;
                    }
                } else {
                    alert("网段不正确，请重新输入 ！");
                    return false;
                }
                if(displayIp.indexOf("-")>-1){
                    if(regex.test(displayIp.indexOf("-")[0]) || regex.test(displayIp.indexOf("-")[1])){

                    }else{
                        alert("网段不正确，请重新输入 ！");
                        return false;
                    }
                }
                var bandWidth = $("#"+element+"-modal .addtableRowInput:eq(2)").val();
                var p =/^[0-9]{1,20}$/;
                if(!p.test(bandWidth)){
                    alert("带宽只能为数字");
                    return false;
                }else if (bandWidth=="0"|| bandWidth== ""){
                    alert("带宽不能为空或者0");
                    return false;
                }
                return true;
            }
            /**************增加行******************************/
            $("#addtable4Row").click(function(){
                $("#addtableRow-modal>.modal-dialog>.modal-content>.modal-body>.form-horizontal").html("");
                var length = titleText.length;
                for(var i=0;i<length;i++){
                    var formGroup = $('<div class="form-group">'+
                            '<div class="col-md-8">'+
                            '<input type="text" class="form-control input-sm m-t-15 addtableRowInput">'+
                            '</div>'+
                            '</div>');
                    var label = $('<lable class="col-md-3 control-label">'+
                            titleText[i]+
                            ':</lable>');
                    $(formGroup).prepend(label);
                    $("#addtableRow-modal>.modal-dialog>.modal-content>.modal-body>.form-horizontal").append(formGroup);
                }
                $("#addtableRow-modal").modal("show");
            });
            $("#btn-addtableRow").click(function(){
                if(valiDate("addtableRow")){
                    $("#addtableRow-modal").modal("hide");
                    var name = $("#addtableRow-modal .addtableRowInput:eq(0)").val();
                    var displayIp = $("#addtableRow-modal .addtableRowInput:eq(1)").val();
                    var bandWidth = $("#addtableRow-modal .addtableRowInput:eq(2)").val();
                    var descrption = $("#addtableRow-modal .addtableRowInput:eq(3)").val();
                    $.ajax({
                        url:"/client/addClient.do",
                        type:"post",
                        data:{bandWidth:bandWidth,moduleId:11,name:name,displayIp:displayIp,descrption:descrption},
                        dataType:"json",
                        success:function(data){
                            switch (data.success-0){
                                case 1:
                                    $.ajax({
                                        url:"/client/getClient.do",
                                        type:"post",
                                        data:{
                                            moduleId:11
                                        },
                                        dataType:"json",
                                        success:function(addData){
                                            $("#table5").bootstrapTable("load",addData);
                                        }
                                    });
                                    break;
                                case 0:
                                    alert("后端验证不通过，保存失败，请稍后再试");
                                    break;
                                case 2:
                                    alert("名称已存在，请重新命名");
                                    break;
                                case 3:
                                    alert("网段不正确，请重新填写");
                                    break;
                            }
                        }
                    });
                }

            });

            $("#deltable4Row").click(function(){
                var selectRowId = $(".tabRowClickbg").attr("data-id"),
                        appId;
                if(selectRowId!=undefined){
                    $.ajax({
                        url:"/client/getClient.do?moduleId=11",
                        async:true,
                        type:"post",
                        data:{},
                        dataType:"json",
                        success:function(data){
                            data.forEach(function(item){
                                if(item.id==selectRowId){
                                    appId = item.appId;
                                }
                            });
                            $("#Confirm-modal").modal("show");
                            $("#btn-ConfirmdelRow").one("click",function(){
                                $.ajax({
                                    url:"/client/delClient.do",
                                    type:"post",
                                    data:{
                                        appId:appId
                                    },
                                    dataType:"json",
                                    success:function(data){
                                        if(data.success=="1"){
                                            $("#table5").bootstrapTable("refresh");
                                        }else {
                                            alert("删除失败，请稍后再试");
                                        }
                                    }
                                });
                            });
                        }
                    });
                }
            });

            $("#changetable4Row").click(function(){
                var selectRowId = $(".tabRowClickbg").attr("data-id"),
                        index = $(".tabRowClickbg").attr("data-index"),
                        dataItem;
                if(selectRowId!=undefined){
                    $.ajax({
                        url:"/client/getClient.do?moduleId=11",
                        async:false,
                        type:"post",
                        data:"",
                        dataType:"json",
                        success:function(cdata){
                            cdata.forEach(function(item){
                                if(item.id==selectRowId){
                                    dataItem = item;
                                }
                            });
                        }
                    });

                    $("#changetableRow-modal>.modal-dialog>.modal-content>.modal-body>.form-horizontal").html("");
                    var InputVal = [];
                    for(var j=0;j<field.length;j++){
                        InputVal.push(dataItem[field[j]]);
                    }
                    for(var i=0;i<titleText.length;i++){
                        var formGroup = $('<div class="form-group">'+
                                '<div class="col-md-8">'+
                                '<input type="text" class="form-control input-sm m-t-15 addtableRowInput"  value="'+InputVal[i]+'">'+
                                '</div>'+
                                '</div>');
                        var label = $('<lable class="col-md-3 control-label">'+
                                titleText[i]+
                                ':</lable>');
                        $(formGroup).prepend(label);
                        $("#changetableRow-modal>.modal-dialog>.modal-content>.modal-body>.form-horizontal").append(formGroup);
                    }
                    $('#changetableRow-modal').modal('show');

                    $("#btn-changetableRow").one("click",function(){
                        if(valiDate("changetableRow")){
                            $('#changetableRow-modal').modal('hide');
                            var name = $("#changetableRow-modal .addtableRowInput:eq(0)").val(),
                                    displayIp = $("#changetableRow-modal .addtableRowInput:eq(1)").val(),
                                    bandWidth = $("#changetableRow-modal .addtableRowInput:eq(2)").val(),
                                    descrption = $("#changetableRow-modal .addtableRowInput:eq(3)").val();
                            $.ajax({
                                url:"/client/updateClient.do",
                                type:"post",
                                data:{
                                    id:selectRowId,
                                    appId:dataItem.appId,
                                    bandWidth:bandWidth,
                                    moduleId:dataItem.moduleId,
                                    name:name,
                                    displayIp:displayIp,
                                    descrption:descrption
                                },
                                dataType:"json",
                                success:function(data){
                                    if(data.success=="1"){
                                        $("#table5").bootstrapTable('updateRow',{
                                            index:index,
                                            row:{
                                                id:selectRowId,
                                                name:name,
                                                bandWidth:bandWidth,
                                                descrption:descrption
                                            }
                                        })
                                    }else {
                                        alert("后端验证不通过，修改失败，请稍后再试");
                                    }
                                }
                            });
                        }
                    });



                }
            });
        }

//        $.inibsTable(null,"#table5",
//                "/client/getClient.do?moduleId=11","#btnAddRemove",
//        ["name","ipNet","bandWidth","descrption"]
//                ,["名称","子网/网段","带宽","备注"]);

        /*-------------初始化表格-------------*/
        $.JinibsTable("#table5","/client/getClient.do?moduleId=11",
                "#btnAddRemove", ["name","ipNet","bandWidth","descrption"]
                ,["名称","子网/网段","带宽","备注"]);

        /*-------------添加行-------------*/
        $("#addtable4Row").click(function(){
            $.JaddbsModalRow(["名称","子网/网段","带宽","备注"]);
        });
        $("#btn-addtableRow").click(function () {
            $.JaddbsTableRow("#table5",
                    "/client/addClient.do",
            "/client/getClient.do","userSide");
        });
        /*-------------修改行内容-------------*/
        $("#changetable4Row").click(function(){
            $.JeditRowModal("/client/getClient.do?moduleId=11",
                    ["name","ipNet","bandWidth","descrption"],
                    ["名称","子网/网段","带宽","备注"]);
        });
        $("#btn-changetableRow").click(function(){
            $.JediTableRow("#table5","/client/updateClient.do","userSide",
                    "/client/getClient.do?moduleId=11");
        });
        /*-------------删除行-------------*/
        $("#deltable4Row").click(function(){
            if($(".tabRowClickbg").attr("data-id")!=undefined){
                $("#Confirm-modal").modal("show");
            }
        });
        $("#btn-ConfirmdelRow").click(function(){
            $.JremovebsTableRow("#table5",
                    "/client/delClient.do",
                    "userSide","/client/getClient.do?moduleId=11");
        });
    });
</script>